package mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import entity.Group;
import entity.User;

public interface GroupMapper {
	Group selectGroupByNameUserId(@Param("groupname")String groupname,@Param("createUserId")Integer createUserId);
	
	Group selectGroupByGroupId(Integer groupId);
	
	List<Integer> selectGroupIdsByUser(User user);
	
	void addGroup(Group group);
	
	List<Group> selectAllGroups();
	
	List<Group> selectGroupsByCreateUser(User user);
	
	void addUserGroup(@Param("groupId")Integer groupId,@Param("userId")Integer userId);
	
	List<Integer> selectUserIdsByGroupId(Integer groupId);
	
	void deleteGroupUser(@Param("groupId")Integer groupId,@Param("userId")Integer userId);
	
	List<Integer> selectAllGroupUserIds();
	
	List<Integer> selectAllGroupsByUserId(Integer userId);
	
	
}
